package com.suda.survey.applets.components;

import javax.swing.text.AttributeSet;
import javax.swing.text.BadLocationException;
import javax.swing.text.PlainDocument;

public class NumOnlyDocument extends PlainDocument {

	private static final long serialVersionUID = 1529529713933408246L;

	public void insertString(int offset, String s, AttributeSet attrSet) throws BadLocationException {
		if(Character.isDigit(s.charAt(0)))
			super.insertString(offset,s,attrSet);
	}
}